#include "HPQueue.h"
#include "APQueue.h"

using namespace std;

int main()
{
	HPQueue<int> hp;
	APQueue<int> ap;

	int acmps = 0;
	int hcmps = 0;

	int j = 20;
	for (int i = 1; i <= 20; i++)
	{
		hp.insert_item(i,j,hcmps);
		ap.insert_item(i,j,acmps);
		--j;
	}
	
	cout << "Array Based:\n";
	for (int i = 1; i <= 20; i++)
	{
		cout << "\nMin key: " << ap.min_key()
			<< "\tMin elem: " << ap.min_elem();
		ap.remove_min(acmps);
	}

	cout << "\nHeap Based: \n";
	for (int i = 1; i <= 20; i++)
	{
		cout << "\nMin key: " << hp.min_key()
			<< "\tMin elem: " << hp.min_elem();
		hp.remove_min(hcmps);
	}
}
